package prj3;

import java.util.GregorianCalendar;
import java.util.Iterator;

import prj3.exceptions.EmptyListException;

public interface ISimulate {
	
	/**
	 * Steps the simulation by 1 minute
	 *
	 */
	public void stepGrid();
	
	/**
	 * Steps the grid by chMinutes minutes
	 * @param chMinutes
	 */
	public void stepGrid(int chMinutes);
	
	/**
	 * Returns an iterator over all the cells in the grid
	 * @return
	 */
	public Iterator iterator();
	
	/**
	 * Sets the simulated time step. This should be called whenever the
	 * timestep is changed to buffer it if required
	 * @param timeStep
	 * @return
	 */
	public boolean setSimulatedTimeStep(GregorianCalendar timeStep);
	
	/**
	 * Returns the simulated timestep. Destructive operation in case of
	 * a buffered list
	 * @return
	 * @throws EmptyListException
	 */
	public GregorianCalendar takeSimulatedTimeStep() throws EmptyListException;
	
	/**
	 * Returns the simulated timestep. Gets the timestep at the given
	 * position
	 * @return
	 * @throws EmptyListException
	 */
	public GregorianCalendar getSimulatedTimeStep(int position) throws EmptyListException;
	
	/**
	 * Sets the sun longitude angle
	 * @param sunAngle
	 * @return
	 */
	public boolean setSunAngle(double sunAngle);
	
	/**
	 * Gets the sun longitude angle
	 * @return
	 * @throws EmptyListException
	 */
	public double takeSunAngle() throws EmptyListException;
	
	/**
	 * Sets the latitude for the sun
	 * @param sunAngle
	 * @return
	 */
	public boolean setSunLatitude(double sunAngle);
	
	/**
	 * Gets the latitude for the sun
	 * @return
	 * @throws EmptyListException
	 */
	public double takeSunLatitude() throws EmptyListException;
	
	/**
	 * Sets the sun distance
	 * @param sunDistance
	 * @return
	 */
	public boolean setSunDistance(double sunDistance);
	
	/**
	 * Gets the sun distance
	 * @return
	 * @throws EmptyListException
	 */
	public double takeSunDistance() throws EmptyListException;
	
	/**
	 * Sets the angle "sun-centerelipse-earth"
	 * @param sunAngle
	 * @return
	 */
	public boolean setSunOrbitAngle(double sunAngle);
	
	/**
	 * Gets the angle "sun-centerelipse-earth"
	 * @return
	 * @throws EmptyListException
	 */
	public double takeSunOrbitAngle() throws EmptyListException;
	
	
	

}
